<!DOCTYPE html>
<html>
<head>
	<title>商品列表</title>
	<link rel="stylesheet" type="text/css" href="/static/css/list.css">
	<script type="text/javascript" src="/static/js/jquery-1.11.1.min.js"></script>
	<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
	<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body>
  	<!-- <nav class="navbar navbar-default navbar-fixed-top">
	  <div class="container">
	    
	  </div>
	 </nav>
 -->
<nav class="navbar navbar-default">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">首页</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">后台首页</a></li>
        <li class=""><a href="#">商品添加</a></li>
        <li class=""><a href="#">活动管理</a></li>
        <li class=""><a href="#">日志信息</a></li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
<div class="container">
	<table class="table table-bordered">
		<tr>
			<th>商品id</th>
			<th>商品名称</th>
			<th>商品图片</th>
			<th>商品修改日期</th>
			<th>商品状态</th>
			<th>操作</th>
		</tr>
		<?php foreach ($data as $key => $value): ?>
		<tr>
			<td><?php echo $value['id'] ?></td>
			<td><?php echo $value['title'] ?></td>
			<td><img width="100px" height="100px" src="<?php echo $value['img'] ?>"></td>
			<td><?php echo date('Y年m月d日 H:i:s', $value['sys_lastmodify']) ?></td>
			<td>
				<?php 
					if($value['sys_status'] == 0){
						echo '待上线';
					}elseif($value['sys_status'] == 1){
						echo '已上线';
					}else{
						echo '已下线';
					}
				?>
			</td>
			<td>
				<a href="upline/id/<?php echo $value['id'] ?>">商品上线</a>
				<a href="downline/id/<?php echo $value['id'] ?>">商品下线</a>
			</td>
		</tr>
		<?php endforeach; ?>
	</table>
</div>
<script type="text/javascript">
	
</script>
</body>
</html>
